package it.unibz.easytravel.server;

import it.unibz.easytravel.server.handlers.KmlHandler;

public enum MessageType{

	KML_REQUEST(new KmlHandler());

	MessageHandler handler;
	
	private MessageType(MessageHandler handler) {
		this.handler = handler;
	}
	
	public MessageHandler getHandler() {
		return handler;
	}
	
	public static MessageType parseType(String name) {
		for (MessageType mt : values())
			if (mt.name().equals(name)) return mt;
		return null;
	}
	
}
